package org.example.bio;

import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.net.Socket;

/**
 * @Program: qiyu-live-app
 * @Description:
 * @Author: zx
 * @Create: 2024-07-15 18:20
 */
public class BioClient {
    public static void main(String[] args) throws Exception {
        // 连接 bio server
        Socket socket = new Socket();
        socket.connect(new InetSocketAddress(9090));
        // 发送数据
        OutputStream outputStream = socket.getOutputStream();
        while (true) {
            outputStream.write("test".getBytes());
            outputStream.flush();
            System.out.println("发送数据");
            Thread.sleep(1000);
        }
    }
}
